﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Class_KetNoi;
namespace GiaoDien
{
    public partial class uc_ChiTietPhongBan : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ChiTietPhongBan()
        {
            InitializeComponent();
        }
        KetNoi_PhongBan kn = new KetNoi_PhongBan();
        public void LoadDuLieu()
        {

            gridControl1.DataSource = kn.LoadDuLieu();
        }
        private void uc_ChiTietPhongBan_Load(object sender, EventArgs e)
        {
            kn.connect();
            LoadDuLieu();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            gridControl1.DataSource = kn.TraCuu_TenPhongBan(txtNoiDung.Text );
        }

        private void btnLamMoi_Click(object sender, EventArgs e)
        {
            LoadDuLieu();
        }
    }
}
